<%-- 
  - Author: Mohtisham.Salahria
  - Date: 23-May-2011
  - Copyright Notice: TRAKHEES
  - Description: show.jsp
 --%>

<%@ include file="/WEB-INF/view/include.jsp"%>
<%@ page import="ae.pcfc.etks.online.web.*"%>

<div id="container" dir='<spring:message code="page.dir"/>'  align='<spring:message code="page.align"/>'>
	<div class="ui-widget_c ui-corner-all" dir='<spring:message code="page.dir"/>'
	align='<spring:message code="page.align"/>'>
	<div class="ui-jqgrid-titlebar ui-widget-header ui-corner-top ui-helper-clearfix">
	
		<c:choose>
   			<c:when
   				test='${requestScope.requestContextAttribute.locale.language == "ar"}'>
				<c:out value="${userRequestView.strProcessCodeDescAr}"></c:out>
			</c:when>
			<c:otherwise>
				<c:out value="${userRequestView.strProcessCodeDescEn}"></c:out>
			</c:otherwise>
		</c:choose>						
		
	</div>	
	<div class="ui-widget_content_c t_fin-black-txt">	
	
	<div>
		<br/>
		<b><spring:message code="label.user.request.application.date"/>: </b>
		<c:out value="${userRequestView.applicationDate}"></c:out>			    
	</div>
	<br>
	<div>
		<b><spring:message code="label.user.request.reference.no"/>:</b>
		<c:out value="${userRequestView.strClientRefNo}"></c:out>			    
	</div>
	<br>
	<div>
		<b><spring:message code="label.user.request.desc"/>: </b>
		<c:choose>
   			<c:when
   				test='${requestScope.requestContextAttribute.locale.language == "ar"}'>
				<c:out value="${userRequestView.strProcessCodeDescAr}"></c:out>
			</c:when>
			<c:otherwise>
				<c:out value="${userRequestView.strProcessCodeDescEn}"></c:out>
			</c:otherwise>
		</c:choose>							    
	</div>
	<br>
	
	<div>
		<b><spring:message code="label.user.request.status"/>:</b>
		<c:choose>
			<c:when test="${userRequestView.strWfStatus == 'I'}">
				<spring:message code="label.user.request.in.progress"/>
			</c:when>
			<c:when test="${userRequestView.strWfStatus == 'R'}">
				<spring:message code="label.user.request.rejected"/>
			</c:when>
			<c:when test="${userRequestView.strWfStatus == 'A'}">
				<spring:message code="label.user.request.approved"/>
			</c:when>
		</c:choose>			   
	</div>
	<br>
	<c:if test="${null != userRequestView.commentsVOs and not empty userRequestView.commentsVOs}">
		<div>
			<b><spring:message code="label.reason"/>: </b>
			<c:out value="${userRequestView.strUserComments}"></c:out>
			<table style="width: 100%" class="t_grid-table">
				<tr class="ui-jqgrid-labels">
						<td class="ui-state-default ui-th-column ui-th-ltr">
							<spring:message code="label.nonclient.person.register.action.date" />
						</td>				 	
						<td class="ui-state-default ui-th-column ui-th-ltr">
						       	<spring:message code="label.department" />
						</td>
				 	<td class="ui-state-default ui-th-column ui-th-ltr">
				      	<spring:message code="label.comment" />
					</td>			
				</tr>
				
				<c:forEach items="${userRequestView.commentsVOs}" var="comments" varStatus="status">
			      <tr>
			      <td><fmt:formatDate pattern="dd/MM/yyyy" value="${comments.commentDate}" /></td>
						<c:choose>
				   			<c:when
				   				test='${requestScope.requestContextAttribute.locale.language == "ar"}'>
								<td><c:out value="${comments.processStep.processStepDescAr}"></c:out></td>
							</c:when>
							<c:otherwise>
								<td><c:out value="${comments.processStep.processStepDescEn}"></c:out></td>
							</c:otherwise>
						</c:choose>

						<td><c:out value="${comments.strCommentsUser}"/> </td>
						</tr>
		 		</c:forEach>
	 		</table>			    
		</div>
	</c:if>
	<br>
		

	<c:if test="${null != serviceRequest  and not empty serviceRequest}">	
		<c:forEach items="${serviceRequest}" var="serviceVO" varStatus="status">   
		 	<fieldset>
					<legend>
					<c:choose>	
						<c:when test='${requestScope.requestContextAttribute.locale.language == "ar"}'>
						 	<c:out value="${serviceVO.strServiceNameArb}"/>
					     </c:when>
					     <c:otherwise>					    	
					      	<c:out value="${serviceVO.strServiceNameEng}"/> 	
					     </c:otherwise>
					 </c:choose>    
					</legend>
			</fieldset>						
					<input value="${serviceVO.strServiceID}" id="${serviceVO.strServiceID}" name="${serviceVO.strServiceID}" type="hidden"/>
					
					 <c:forEach items="${serviceVO.arrServiceAttributes}" var="serviceAttribute" varStatus="status">
		 	 		<div class="fm-req clear">
		 	 			<label>
		 	 			<c:choose>
		 	 					<c:when test="${serviceAttribute.strNecessisty == 'M'}">
		 	 						<span class="t_star">*</span>		 	 					
		 	 					</c:when>		 	 					
		 	 			</c:choose>	
		 	 			<c:choose>
			 	 			<c:when test='${requestScope.requestContextAttribute.locale.language == "ar"}'>
								 <c:out value="${serviceAttribute.strServiceAttributeNameARB}"/>
							</c:when>
						     <c:otherwise>					     	
						     	 <c:out value="${serviceAttribute.strServiceAttributeNameENG}"/>
						     </c:otherwise>
						     </c:choose>
						   </label>  						
						<c:out value="${serviceAttribute.strAttrValue}"></c:out>
						<br/>
					  </div>
					  <div style="clear:both"></div>	
					 </c:forEach>   

		</c:forEach>  

	</c:if>	
	
	<c:if test="${null != clientRoleList  and not empty clientRoleList}">	
		<div>
			<table style="width: 100%" class="t_grid-table">
				<tr class="ui-jqgrid-labels">
					<td class="ui-state-default ui-th-column ui-th-ltr">
				         <spring:message code="label.user.serialno" />
				 	</td>
				 	<td class="ui-state-default ui-th-column ui-th-ltr">
				       	<spring:message code="label.user.roledescriptionen" />
				 	</td>
				 	<td class="ui-state-default ui-th-column ui-th-ltr">
				      	<spring:message code="label.user.roledescriptionenar" />
					</td>			
				</tr>
				
				<c:forEach items="${clientRoleList}" var="myitem" varStatus="status">
			      <tr>
			      	<td> <c:out value="${status.index +1 }"></c:out> </td>
			      	<td><c:out value="${myitem.strCrDesc}"/> </td>   
			        <td><c:out value="${myitem.strCrDescArb}"/> </td>			        
			      </tr> 
		 		</c:forEach>
	 		</table>		
		</div>	
	</c:if>

	</div>
</div>		
	
</div>
	
